package com.sky.controller.user;

import com.sky.result.Result;
import com.sky.service.user.WxPayService;
import com.sky.wx.wxdto.WxPayDto;
import org.apache.http.impl.client.CloseableHttpClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("user/order")
public class WxPayController {
    @Autowired
    private WxPayService wxPayService;


    @PutMapping("/payment")
    public Result<String> payment(@RequestBody WxPayDto wxPayDto) throws Exception {
       wxPayService.payment(wxPayDto);
        return Result.success();
    }

}
